From 14feafe3a9051ca1e8b515bc62dbd6acdd1c55b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sun, 10 Feb 2019 10:28:32 +0100 Subject: [PATCH] window: Remove GList link directly Instead of walking the list again and looking for the GList pointer we already have. --- gtk/gtkwindow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 38690e7e56..db108c8a2d 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -10707,7 +10707,8 @@ gtk_window_update_pointer_focus_on_state_change (GtkWindow *window, if (GTK_WIDGET (focus->toplevel) == widget) { /* Unmapping the toplevel, remove pointer focus */ - gtk_window_remove_pointer_focus (window, focus); + priv->foci = g_list_remove_link (priv->foci, cur); + gtk_pointer_focus_unref (focus); } else if (focus->target == widget || gtk_widget_is_ancestor (focus->target, widget)) -- 2.30.2